﻿

namespace Salary.Domain
{
    public class Position : Entity
    {
        private Category _category;
        private string _name;
        private decimal _percent;

        #region Constructor

        protected Position()
        {
            
        }
        public Position(Category category, string name)
        {
            _name = name;
            _category = category;
            switch (category)
            {
                case Category.First:
                    _percent = 0.03m;
                    break;
                case Category.Second:
                    _percent = 0.02m;
                    break;
                case Category.Third:
                    _percent = 0.01m;
                    break;
            }
        }
        #endregion

        #region Properties

        public virtual Category Category
        {
            get { return _category; }
            set { _category = value; }
        }
        public virtual string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        public virtual decimal Percents
        {
            get { return _percent; }
            set { _percent = value; }
        }
        #endregion
    }
}
